import { PolylineEdgeModel , PolylineEdge   } from '@logicflow/core';

class FlyFlowPlyLineEdge extends PolylineEdge{}

class ProcessModel extends PolylineEdgeModel    {
	setAttributes() {
		const { properties: { refuse} } = this;

		this.isAnimation = false;
		this.zIndex=200

	}
	getEdgeStyle() {
		const style = super.getEdgeStyle();
		const { properties } = this;
		if (properties.refuse) {
			style.strokeDasharray = "4 4";
			style.stroke = "red";

		}
		return style;
	}
	getOutlineStyle() {
		const style = super.getOutlineStyle();
		//style.stroke = "red";
	//	style.hover && (style.hover.stroke = "red");
		return style;
	}


	getTextStyle() {

		const { properties: { refuse} } = this;


		const style = super.getTextStyle();
		style.color = "black";
		style.fontSize = 10;
		if(refuse){
			style.color='red'
		}
		return style;
	}
}
export {ProcessModel,FlyFlowPlyLineEdge}

